package com.command.command;

/**
 * 关命令
 */
public class LightOffCommand implements Command{

    private LightCommandReceiver receiver ;
    //构造
    public LightOffCommand(LightCommandReceiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        receiver.off();
    }

    @Override
    public void undo() {
        receiver.on();
    }
}
